<template>
  <div id="app">
    <zx-search-form
      ref="queryForm"
      labelWidth="200"
      :config="tableHead"
      :form="queryParams"
    />
  </div>
</template>

<script>
import zxbutton from './packages/button/src/main'
export default {
  name: 'app',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      //列信息
      tableHead: [
        {
          prop: "vesselName",
          label: "海轮名称",
          fixed: "left",
          width: 120,
        },
        { prop: "vesselVoyage", label: "海轮航次", fixed: "left", width: 110 },
        {
          prop: "plannedTonnage",
          label: "计划吨位(t)",
          ext: "number",
          width: 130,
          align: "right",
        },
        {
          prop: "plannedArriveLoadingPortTime",
          label: "计划抵装港时间",
          ext: "time",
          width: 150,
        },
        // {
        //   prop: "shipper",
        //   label: "发货人",
        //   type: "CDP_SHIPPER",
        //   ext: "select",
        //   width: 100,
        // },
        // {
        //   prop: "coalCategory",
        //   label: "煤炭品类",
        //   type: "CDP_COAL_CATEGORY",
        //   ext: "select",
        //   multiple: true,
        //   width: 120,
        // },
        // {
        //   prop: "coalType",
        //   label: "煤种",
        //   type: "CDP_COAL_TYPE",
        //   ext: "select",
        // },
        // {
        //   prop: "loadingPort",
        //   label: "装货港",
        //   type: "CDP_VESSEL_LOADING_PORT",
        //   ext: "select",
        //   filterable: true,
        //   width: 100,
        // },
        // {
        //   prop: "dischargePort",
        //   label: "卸货港",
        //   type: "CDP_TRANSIT_PORT_SUBSIDIARY",
        //   width: 100,
        //   related: {
        //     0: {
        //       min: 51,
        //       max: Infinity,
        //     },
        //     1: {
        //       min: 0,
        //       max: 50,
        //     },
        //   },
        //   ext: "select",
        //   filterable: true,
        // },
        { prop: "monthProperty", label: "所属月", ext: "month", width: 100 },
        // {
        //   prop: "periodProperty",
        //   label: "所属旬",
        //   type: "CDP_PERIOD_PROPERTY",
        //   ext: "select",
        //   width: 100,
        // },
        { prop: "businessType", label: "业务类型", width: 120 },
        {
          prop: "loadAgreementDay",
          label: "装港约定用时(天)",
          align: "right",
          ext: "number",
          hidePre: true,
          width: 180,
        },
        {
          prop: "dischargeAgreementDay",
          label: "卸港约定用时(天)",
          align: "right",
          ext: "number",
          hidePre: true,
          width: 180,
        },
        // {
        //   prop: "planStatus",
        //   label: "计划状态",
        //   type: "CDP_PLAN_STATUS",
        //   ext: "select",
        //   width: 120,
        // },
        // {
        //   prop: "transitStatus",
        //   label: "中转状态",
        //   type: "CDP_TRANSIT_STATUS",
        //   ext: "radio",
        //   width: 120,
        // },
      ],
      //查询表单
      queryParams: {
        vesselName: undefined,
        vesselVoyage: undefined,
        plannedArriveLoadingPortTime: undefined,
        shipper: undefined,
        coalCategory: undefined,
        coalType: undefined,
        loadingPort: undefined,
        dischargePort: undefined,
        monthProperty: undefined,
        periodProperty: undefined,
        businessType: undefined,
        loadAgreementDay: undefined,
        dischargeAgreementDay: undefined,
        planStatus: undefined,
        transitStatus: undefined,
      },
    }
  },
  methods: {
    clickHandle() {
      console.log('click')
    }
  },
  components: {
    zxbutton
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
